add readFileString, writeFileString, appendFileString
authorJoey Hess <joeyh@joeyh.name>
Fri, 5 Sep 2025 18:51:26 +0000 (14:51 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 5 Sep 2025 18:54:36 +0000 (14:54 -0400)
commit867110e9ee411b7dde2f7a195f09b1f80c442f40
tree16326e5ae610aa9234dab50f3abc868052937bc6
parent171b427eb87b691d2bdcac4d0a95ba20642af343
add readFileString, writeFileString, appendFileString

Exported by Common, so they will be available everywhere.
These are the same as readFile, writeFile, appendFile.
But have two benefits:

* They take OsPath, so using them avoids converting back and forth
  unncessarily.
* They use the close-on-exec flag so can't leak FDs to child processes.
  Unlike the standard Haskell versions which unfortunately have that
  wart currently. (I do hope the standard versions get fixed
  eventually.)

Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Common.hs
Utility/FileIO.hs
Utility/FileIO/String.hs [new file with mode: 0644]
git-annex.cabal